package se.jocke.nbrs.ui.node;

import javax.swing.Action;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
import org.openide.util.Lookup;
import se.jocke.nbrs.service.RestServiceManager;
import se.jocke.nbrs.ui.action.AddNewRestServiceGroupAction;

/**
 *
 * @author jocke
 */
public class RestServiceRootNode extends AbstractNode {

    public RestServiceRootNode() {
        super(new RestServiceGroupKeys(Lookup.getDefault().lookup(RestServiceManager.class).getGroups()));
    }

    @Override
    public Action[] getActions(boolean context) {
        if (!context) {
            return new Action[]{new AddNewRestServiceGroupAction()};
        } else {
            return null;
        }
    }

}
